home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 21 / AMIGAplus Sonderheft 21 (1999)(ICP)(DE)[!].iso / PublicDomain / Emulatoren / ppclibemu / README < prev    next >
Text File  |  1999-08-23  |  13KB  |  409 lines

  1.  
  2. ---------- ppclibemu V0.6d - The ppc.library emulation for WarpOS ----------
  3.  
  4.  
  5. INTRODUCTION
  6.     The importance of WarpOS for PowerPC equipped Amigas is constantly
  7.     increasing. OS3.5 will support WarpOS and future PowerPC G3/G4
  8.     boards will also be based on this kernel.
  9.  
  10.     Some may like it and some not. I like features in both kernels,
  11.     and in my opinion there must be a possibility to run most of the old
  12.     PowerUp software under WarpOS in future. I'm also sick of rebooting
  13.     my system, when switching the kernel. So the only solution is:
  14.     ppc.library emulation under WarpOS!
  15.  
  16.  
  17. FEATURES
  18.     Since V0.5 you can start ELF objects directly (from shell or
  19.     from Workbench). The emulation library installs a LoadSeg()-patch
  20.     which detects and starts ELF objects. But in opposition to the
  21.     original library, the patch can be removed when the library is
  22.     expunged ("avail flush"). ;)
  23.  
  24.     Of course you can also start ELF objects by using SAS/C's RunElf,
  25.     Ralph Schmidt's PPCLoad or vbcc's PPCRun.
  26.  
  27.     Since V0.6 the whole PowerUp message system is supported. It's
  28.     slower than the original, but there is still room for improvement.
  29.  
  30.     The SAS/C HunkObj format is supported since V0.6d. It uses an
  31.     illegal version of 0 in the ELF header's e_ident[EI_VERSION] field.
  32.  
  33.     The following functions of the original ppc.library are supported:
  34.       o PPCLoadObject
  35.       o PPCUnLoadObject
  36.       o PPCRunObject
  37.       o PPCAllocMem (NOCACHESYNCM68K simulated by allocating chip RAM)
  38.       o PPCFreeMem
  39.       o PPCAllocVec (NOCACHESYNCM68K simulated by allocating chip RAM)
  40.       o PPCFreeVec
  41.       o PPCCreatePool (NOCACHESYNCM68K simulated by allocating chip RAM)
  42.       o PPCDeletePool
  43.       o PPCAllocPooled
  44.       o PPCFreePooled
  45.       o PPCAllocVecPooled
  46.       o PPCFreeVecPooled
  47.       o PPCDebugMode (private, doesn't work like the original)
  48.       o PPCCreateTask
  49.       o PPCDeleteTask
  50.       o PPCGetTaskAttrs (not all tags supported)
  51.       o PPCGetAttrs (PPCINFOTAG_EXCEPTIONHOOK not supported)
  52.       o PPCReadLong
  53.       o PPCWriteLong
  54.       o PPCGetObjectAttrs
  55.       o PPCWriteLongFlush
  56.       o PPCReadWord
  57.       o PPCWriteWord
  58.       o PPCReadByte
  59.       o PPCWriteByte
  60.       o PPCCacheClearE
  61.       o PPCCacheInvalidE
  62.       o PPCCacheTrashE
  63.       o PPCLoadObjectTagList
  64.       o PPCCreatePort
  65.       o PPCDeletePort
  66.       o PPCObtainPort
  67.       o PPCReleasePort
  68.       o PPCWaitPort
  69.       o PPCCreateMessage
  70.       o PPCDeleteMessage
  71.       o PPCGetMessage
  72.       o PPCGetMessageAttr
  73.       o PPCReplyMessage
  74.       o PPCSendMessage
  75.  
  76.     The following functions of the original PowerUp kernel are supported:
  77.       o PPCAdd64
  78.       o PPCAdd64p
  79.       o PPCAddHead
  80.       o PPCAddHeadSync (implementation might be incorrect)
  81.       o PPCAddTail
  82.       o PPCAddTailSync (implementation might be incorrect)
  83.       o PPCAllocMem (NOCACHESYNCM68K simulated by allocating chip RAM)
  84.       o PPCAllocPooled (No pooled mem under WOS, same as PPCAllocMem)
  85.       o PPCAllocSignal
  86.       o PPCAllocVec (NOCACHESYNCM68K simulated by allocating chip RAM)
  87.       o PPCAllocVecPooled (No pooled mem under WOS, same as PPCAllocVec)
  88.       o PPCAnd64
  89.       o PPCAnd64p
  90.       o PPCAsl64
  91.       o PPCAsl64p
  92.       o PPCAsr64
  93.       o PPCAsr64p
  94.       o PPCAttemptSemaphore
  95.       o PPCAttemptSemaphoreByName
  96.       o PPCAttemptSemaphoreShared
  97.       o PPCCacheFlush
  98.       o PPCCacheFlushAll
  99.       o PPCCacheInvalid
  100.       o PPCCallM68k (Flags ignored. Asynchronous calls are synchronous.)
  101.       o PPCCallOS (Flags ignored. Asynchronous calls are synchronous.)
  102.       o PPCClose
  103.       o PPCCloseLibrary
  104.       o PPCCmp64
  105.       o PPCCmp64p
  106.       o PPCCreateMessage
  107.       o PPCCreatePool
  108.       o PPCCreatePort
  109.       o PPCCreateSemaphore
  110.       o PPCCreateTimerObject
  111.       o PPCDeleteMessage
  112.       o PPCDeletePool
  113.       o PPCDeletePort
  114.       o PPCDeleteTimerObject
  115.       o PPCDeleteSemaphore
  116.       o PPCDivRem64
  117.       o PPCDivRem64p
  118.       o PPCDivs64
  119.       o PPCDivs64p
  120.       o PPCDivu64
  121.       o PPCDivu64p
  122.       o PPCEnqueue
  123.       o PPCEnqueueSync (implementation might be incorrect)
  124.       o PPCFindName
  125.       o PPCFindNameSync (implementation might be incorrect)
  126.       o PPCFindTagItem
  127.       o PPCFindTask
  128.       o PPCFinishTask
  129.       o PPCFreeMem
  130.       o PPCFreePooled
  131.       o PPCFreeSignal
  132.       o PPCFreeVec
  133.       o PPCFreeVecPooled
  134.       o PPCGetAttr
  135.       o PPCGetLibSymbol
  136.       o PPCGetMessage
  137.       o PPCGetMessageAttr
  138.       o PPCGetTagData
  139.       o PPCGetTaskAttr (not all tags supported)
  140.       o PPCGetTimerObject
  141.       o PPCInput
  142.       o PPCInsert
  143.       o PPCInsertSync (implementation might be incorrect)
  144.       o PPCLsl64
  145.       o PPCLsl64p
  146.       o PPCLsr64
  147.       o PPCLsr64p
  148.       o PPCMods64
  149.       o PPCMods64p
  150.       o PPCModu64
  151.       o PPCModu64p
  152.       o PPCMuls64
  153.       o PPCMuls64p
  154.       o PPCMulu64
  155.       o PPCMulu64p
  156.       o PPCNeg64
  157.       o PPCNeg64p
  158.       o PPCNewList
  159.       o PPCNextTagItem
  160.       o PPCObtainPort
  161.       o PPCObtainSemaphore
  162.       o PPCObtainSemaphoreByName
  163.       o PPCObtainSemaphoreShared
  164.       o PPCOpen
  165.       o PPCOpenLibrary
  166.       o PPCOr64
  167.       o PPCOr64p
  168.       o PPCOutput
  169.       o PPCRawDoFmt
  170.       o PPCRead
  171.       o PPCReadByte
  172.       o PPCReadLong
  173.       o PPCReadWord
  174.       o PPCReleasePort
  175.       o PPCReleaseSemaphore
  176.       o PPCRemHead
  177.       o PPCRemHeadSync (implementation might be incorrect)
  178.       o PPCRemove
  179.       o PPCRemoveSync (implementation might be incorrect)
  180.       o PPCRemTail
  181.       o PPCRemTailSync (implementation might be incorrect)
  182.       o PPCReplyMessage
  183.       o PPCRevision
  184.       o PPCSeek
  185.       o PPCSendMessage
  186.       o PPCSetSignal
  187.       o PPCSetTaskAttr (not all tags supported)
  188.       o PPCSetTimerObject
  189.       o PPCSignal (might not work, because of different task definitions)
  190.       o PPCSub64
  191.       o PPCSub64p
  192.       o PPCVersion
  193.       o PPCWait
  194.       o PPCWaitPort
  195.       o PPCWrite
  196.       o PPCWriteByte
  197.       o PPCWriteLong
  198.       o PPCWriteWord
  199.       o PPCXor64
  200.       o PPCXor64p
  201.       o memcpy
  202.       o strcmp
  203.       o strcpy
  204.       o strlen
  205.       o __adddi3
  206.       o __anddi3
  207.       o __ashldi3
  208.       o __ashrdi3
  209.       o __cmpdi2
  210.       o __divdi3
  211.       o __fixdfdi
  212.       o __fixsfdi
  213.       o __fixunsdfdi
  214.       o __fixunssfdi
  215.       o __floatdidf
  216.       o __floatdisf
  217.       o __floatunsdidf
  218.       o __iordi3
  219.       o __lmulq
  220.       o __lshldi3
  221.       o __lshrdi3
  222.       o __moddi3
  223.       o __muldi3
  224.       o __negdi2
  225.       o __qdivrem
  226.       o __subdi3
  227.       o __ucmpdi2
  228.       o __udivdi3
  229.       o __umoddi3
  230.       o __xordi3
  231.  
  232.     Unimplemented M68k functions will return with d0=0 and PPC
  233.     functions return with r3=0.
  234.  
  235.     These are still missing:
  236.       o Asynchronous 68k function calls
  237.       o Exception handling, debugger support
  238.       o Loading an starting ELF objects by the PowerPC
  239.       o Port lists
  240.       o PPCprintf and other vararg functions
  241.       o PPCDoMethodA/SuperMethodA
  242.       o Some tags are missing for the GetAttrs and GetTaskAttrs functions.
  243.  
  244.  
  245. POWERUP DEVELOPERS
  246.     If you are the author of a program, which doesn't work under
  247.     emulation, then I need your help! Please try to determine the
  248.     reason for crashes or failures in your source and tell me about the
  249.     problem. I think the whole Amiga community would be very grateful!
  250.  
  251.     By using your source and the debugging facilities of ppclibemu it
  252.     should be not too hard. Refer to the BUGS section for debugging
  253.     informations.
  254.  
  255.  
  256. REQUIREMENTS
  257.     o 68040 or 68060
  258.     o CyberstormPPC or BlizzardPPC
  259.     o WarpOS V4 (powerpc.library V15)
  260.  
  261.  
  262. BLIZZARD PPC NOTES
  263.     You will get some problems on a BPPC with a new flash ROM, because
  264.     the original ppc.library is a resident module and will be
  265.     initialized during reset.
  266.  
  267.     The only chance is to use BPPCFix (should be included in the
  268.     WarpOS V4 distribution) and install another resident module, which
  269.     removes the ppc.library from the system before it can initialize
  270.     itself. Refer to INSTALLATION for further informations.
  271.  
  272.     Afterwards you have a 'clean' system, which allows you to start
  273.     WarpOS without using a Terminator (as with a CSPPC). Please use a
  274.     Terminator setting of '1' or '0'. WarpOS will not work with the
  275.     emulation in terminator-mode '2'.
  276.  
  277.  
  278. INSTALLATION
  279.     Just start the "Installer_Script". Or if you want to do it manually:
  280.  
  281.     Save your original ppc.library:
  282.  
  283.       > copy libs:ppc.library libs:ppc.library.orig
  284.  
  285.     Copy the ppc.library emulation from this directory to libs:
  286.  
  287.       > copy ppc.library libs:
  288.  
  289.     Set the environment variable powerpc/NoPatch to "1":
  290.  
  291.       > setenv powerpc/NoPatch 1
  292.       > copy ENV:powerpc/NoPatch ENVARC:powerpc/
  293.  
  294.     Finally reboot your system to flush the old ppc.library.
  295.  
  296.     BLIZZARD PPC OWNERS ONLY:
  297.       Disable the original ppc.library resident module with
  298.         > BPPCFix install
  299.  
  300.       If you want to disable the original library for a longer
  301.       time, you may also put the BPPCFix into your S:Startup-Sequence:
  302.         ; $VER: Startup-Sequence_HardDrive 40.2 (25.2.93)
  303.         ; Startup-Sequence for hard drive systems
  304.         BPPCFix install reboot
  305.         [...]
  306.  
  307.       If the fix is not already installed, it will do so and
  308.       automatically reboot the system.
  309.  
  310.  
  311. USAGE
  312.     Either you install the emulation ppc.library permamently in LIBS:
  313.     or use "loadlib" to temporarily activate the emulation library. It
  314.     can be flushed completely from the system at any time, by using
  315.     "avail flush" (provided that no application needs it anymore).
  316.  
  317.     Please remove PPCInstall from your startup-sequence. You will get
  318.     the same effect by using "loadlib path:ppc.library", but don't
  319.     place the call before "C:Copy >NIL: ENVARC: RAM:ENV ALL NOREQ" !
  320.  
  321.     For a check, you might want to try some of the supplied test ELF
  322.     objects, which were compiled by vbcc-ppc. For example:
  323.  
  324.       > hello_world.elf
  325.       Hello World!
  326.  
  327.     or:
  328.       > runelf hello_world.elf
  329.       Hello World!
  330.  
  331.     timerobj.elf demonstrates the usage of TimerObjects.
  332.  
  333.     objattr_demo is a 68k program for testing the PPCGetObjectAttrs()
  334.     function. For example, you can try to list all symbols of
  335.     hello_world.elf:
  336.  
  337.       > objattr_demo hello_world.elf
  338.       0x08D45A40      0x00000000      
  339.       0x08586860      0x00000000      
  340.       0x08587280      0x00000000      
  341.       0x085868C0      0x00000000      
  342.       0x08586940      0x00000000      
  343.       0x08D45B50      0x00000000      __error
  344.       0x08D45C38      0x00000100      parse_cli_args
  345.       [...]
  346.  
  347.     msgtest is a 68k program which starts an asynchronous PPC task
  348.     (msgtest.elf) to test the message system. It sends one message
  349.     to the PPC task and waits for reply.
  350.  
  351.  
  352. COMPATIBILITY
  353.     The emulation is nearly complete, but still there might be some
  354.     programs which don't run. Though, since the implementation of the
  355.     message system emulation in V0.6, there are first life-signs from
  356.     some of the 'difficult' candidates. For example M.A.M.E and IsisPPC
  357.     are starting now, but refuse to work some time later. Since V0.6d the
  358.     SAS/C HunkObj files are supported, which means that the RC5-client
  359.     will run under emulation. Also some more demos, like VA_OffShore,
  360.     are running since this version (not on my P96 system - but it says
  361.     "screen mode not found", so I think it should do on others :).
  362.     The PPC-engine of AmigaAmp doesn't work, because it needs PPCCreateTask()
  363.     on the PPC-side, which is not emulated (wait for V0.7!).
  364.  
  365.     The following list of programs should work under emulation:
  366.  
  367.       o ADoomPPC (when started by runelf, use "setenv DOOMWADDIR")
  368.       o VDoom (PPCLoad or old PPCRun only!)
  369.       o ADoM, HereticPPC, HexenPPC
  370.       o Some demos: VAEDies, VAGhost, VA_OffShore, ...
  371.       o musicin, musicout
  372.       o Packers: unlzx, lha, unrar, uuencode, uudecode, etc.
  373.       o Emulators: PPCFrodo, AmigaVGBPPC, PCEmulator, UAE-PPC, Ami-Generator
  374.       o Graphics: SManPPC, PowerView, Benoit, Reflections 4.3
  375.       o Ripley
  376.       o qmap
  377.       o ak-PPC-datatypes, SuperView NG
  378.       o rc5des_PPC
  379.       o PowerUp developer examples
  380.       o PowerUp demos: Plane, Mountain, Memtest
  381.  
  382.  
  383. BUGS
  384.     There are still some functions of ppc.library and the PowerUp kernel
  385.     which are not supported (and there might be a lot of bugs in the
  386.     functions which *are* supported :).
  387.  
  388.     If you get any difficulties (I'm sure you will :), then try to
  389.     isolate the problem by enabling the debugging mode. You can
  390.     enable debugging mode on the 68k-side by using the ppcdbmode
  391.     utility:
  392.       ppcdbmode 1      - enables all error requesters
  393.       ppcdbmode 0x8000 - enables serial debugging (you can use Sushi)
  394.     (or ppcdbmode 0x8001 to enable both).
  395.  
  396.     You can get full serial debugging (kernel emulation too) by
  397.     exchanging ppc.library with ppc.library.debug. This is the
  398.     recommended method - but execution will be *much* slower.
  399.  
  400.     If you think that you found a bug, then send me your serial debugging
  401.     output, which you got from Sushi or a terminal. Also give me the name
  402.     of the program and the arguments used. You should be able to determine
  403.     by yourself, if it's a real bug or only an unimplemented function
  404.     which causes the problems.
  405.  
  406.  
  407.  
  408. Frank Wille                  13-May-1999                frank@phoenix.owl.de
  409.